package SmartHome.entity;

import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;

import java.util.Date;

public class RecordInfo {
    private final SimpleIntegerProperty recordId;
    private final SimpleStringProperty recordTime;
    private final SimpleStringProperty devicetype;
    private final SimpleIntegerProperty Temperature;
    private final SimpleIntegerProperty Humidity;
    private final SimpleIntegerProperty Brightness;
    private final SimpleIntegerProperty Open;
    public int c;

    public RecordInfo(Integer recordId, String recordTime, String devicetype, Integer Temperature,
                      Integer Humidity, Integer Brightness, Integer Open,int c){
        this.recordId = new SimpleIntegerProperty(recordId);
        this.recordTime = new SimpleStringProperty(recordTime);
        this.devicetype = new SimpleStringProperty(devicetype);
        this.Temperature = new SimpleIntegerProperty(Temperature);
        this.Humidity = new SimpleIntegerProperty(Humidity);
        this.Brightness = new SimpleIntegerProperty(Brightness);
        this.Open = new SimpleIntegerProperty(Open);
        this.c = c;
    }

    public int getRecordId() {
        return recordId.get();
    }
    public SimpleIntegerProperty recordIdProperty(){return recordId;}
    public void setRecordId(int recordId) {
        this.recordId.set(recordId);
    }

    public String getRecordTime() {
        return recordTime.get();
    }
    public SimpleStringProperty recordTimeProperty(){ return recordTime; }
    public void setRecordTime(String recordTime) {
        this.recordTime.set(recordTime);
    }

    public String getDeviceType(){return devicetype.get();}
    public SimpleStringProperty devicetypeProperty(){return devicetype;}
    public void setDeviceType(String devicetype) {
        this.devicetype.set(devicetype);
    }

    public int getTemperature(){ return Temperature.get(); }
    public SimpleIntegerProperty TemperatureProperty(){ return Temperature; }
    public void setTemperature(Integer Temperature) {
        this.Temperature.set(Temperature);
    }

    public int getHumidity(){ return Humidity.get(); }
    public SimpleIntegerProperty HumidityProperty(){ return Humidity; }
    public void setHumidity(Integer Humidity) {
        this.Humidity.set(Humidity);
    }

    public int getBrightness(){ return Brightness.get(); }
    public SimpleIntegerProperty BrightnessProperty(){ return Brightness; }
    public void setBrightness(Integer Brightness) {
        this.Brightness.set(Brightness);
    }

    public int IsOpen(){ return Open.get(); }
    public SimpleIntegerProperty OpenProperty() {
        return Open;
    }
    public void setExist(Integer Open){
        this.Open.set(Open);
    }

    @Override
    public String toString() {
        return "RecordInfo{" +
                "recordId=" + recordId +
                ", recordTime='" + recordTime + '\'' +
                ", devicetype='" + devicetype + '\'' +
                ", Temperature ='" + Temperature + '\'' +
                ", Humidity ='" + Humidity + '\'' +
                ", Brightness='" + Brightness + '\''+
                ", idOpen='" + Open + '\''+
                ", c='" + c + '\''+
                '}';
    }

}
